package com.zhonghui.kf.service.impl;

import java.util.List;

import com.zhonghui.common.core.domain.entity.SysUser;
import com.zhonghui.kf.domain.vo.ProcurementChatShistoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhonghui.kf.mapper.ProcurementChatShistoryMapper;
import com.zhonghui.kf.domain.ProcurementChatShistory;
import com.zhonghui.kf.service.IProcurementChatShistoryService;

/**
 * 客服聊天记录Service业务层处理
 * 
 * @author zhonghui
 * @date 2023-11-29
 */
@Service
public class ProcurementChatShistoryServiceImpl implements IProcurementChatShistoryService 
{
    @Autowired
    private ProcurementChatShistoryMapper procurementChatShistoryMapper;

    /**
     * 查询客服聊天记录
     * 
     * @param id 客服聊天记录主键
     * @return 客服聊天记录
     */
    @Override
    public ProcurementChatShistory selectProcurementChatShistoryById(Long id)
    {
        return procurementChatShistoryMapper.selectProcurementChatShistoryById(id);
    }

    @Override
    public SysUser getUserChat() {
        return procurementChatShistoryMapper.getUserChat();
    }

    @Override
    public List<ProcurementChatShistoryVo> getUserList(Long[] ids) {
        return procurementChatShistoryMapper.getUserList(ids);
    }

    /**
     * 查询客服聊天记录列表
     * 
     * @param procurementChatShistory 客服聊天记录
     * @return 客服聊天记录
     */
    @Override
    public List<ProcurementChatShistory> selectProcurementChatShistoryList(ProcurementChatShistory procurementChatShistory)
    {
        return procurementChatShistoryMapper.selectProcurementChatShistoryList(procurementChatShistory);
    }

    /**
     * 新增客服聊天记录
     * 
     * @param procurementChatShistory 客服聊天记录
     * @return 结果
     */
    @Override
    public int insertProcurementChatShistory(ProcurementChatShistory procurementChatShistory)
    {
        return procurementChatShistoryMapper.insertProcurementChatShistory(procurementChatShistory);
    }

    /**
     * 修改客服聊天记录
     * 
     * @param procurementChatShistory 客服聊天记录
     * @return 结果
     */
    @Override
    public int updateProcurementChatShistory(ProcurementChatShistory procurementChatShistory)
    {
        return procurementChatShistoryMapper.updateProcurementChatShistory(procurementChatShistory);
    }

    /**
     * 批量删除客服聊天记录
     * 
     * @param ids 需要删除的客服聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteProcurementChatShistoryByIds(Long[] ids)
    {
        return procurementChatShistoryMapper.deleteProcurementChatShistoryByIds(ids);
    }

    /**
     * 删除客服聊天记录信息
     * 
     * @param id 客服聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteProcurementChatShistoryById(Long id)
    {
        return procurementChatShistoryMapper.deleteProcurementChatShistoryById(id);
    }
}
